﻿function randomTreeNode(tree, pid, b) {
    var result = '';
    var tempArray = [];
    if (!b) {
        var idArray = [];
        var pidArray = [];
        tree.forEach(function (v, i) {
            if (pid) {
                if (pid == v.pid) {
                    idArray.push(v.id);
                    pidArray.push(v.pid);
                }
            } else {
                idArray.push(v.id);
                pidArray.push(v.pid);
            }
        })
        tempArray = idArray.filter(function (v) {
            return pidArray.indexOf(v) === -1
        });
        result = tempArray[Math.floor(Math.random() * tempArray.length)] + '';
    } else {
        tree.forEach(function (v, i) {
            if (v.pid + '' == '0') {
                tempArray.push(v.id);
            }
        })
        result = tempArray[Math.floor(Math.random() * tempArray.length)] + '';
    }
    return result;
}
var $System = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/User/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $System.Arrays.length; i++) {
                        temp.push($System.Arrays[i]);
                    }

                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {

                            $System.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/User/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($System.Arrays.length == 0) {
                            $System.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var loginName = p.model.loginName;
                        var sex = p.model.sex;
                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $System.Arrays.length; i++) {
                            var user = $System.Arrays[i];

                            if (loginName && user.loginName.indexOf(loginName) == -1)
                                continue;
                            if (sex && user.sex.indexOf(sex) == -1)
                                continue;
                            limitArrays2.push(user);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/User/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$System.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/User/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$System.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].loginName = thisentity.loginName;
                            thisArrays[i].name = thisentity.id;
                            thisArrays[i].password = thisentity.password;
                            thisArrays[i].sex = thisentity.sex;
                            thisArrays[i].remarks = thisentity.remarks;
                            thisArrays[i].lastUpdate = thisentity.lastUpdate;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$System.Arrays.push({
                            id: thisentity.id,
                            loginName: thisentity.loginName,
                            name: thisentity.name,
                            password: thisentity.password,
                            sex: thisentity.sex,
                            remarks: thisentity.remarks,
                            lastUpdate: thisentity.lastUpdate

                        });

                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;


        }


    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $System.Arrays.push(Mock.mock({
                loginName: Mock.Random.cname(),
                password: Mock.Random.cname(),
                name: Mock.mock('@county(true)'),
                lastUpdate: Mock.Random.date(),
                remarks: Mock.mock('@county(true)'),
                sex: randomKey('01'),
                id: Mock.Random.id()
            }));

        }
    }
}

var testTree = [{
        "id": 13,
        "pluginId": null,
        "pid": 0,
        "order": 1,
        "name": "全部",
    },

    {
        "id": 17,
        "pluginId": 6,
        "pid": 16,
        "order": 1,
        "name": "abcf",
    },
    {
        "id": 18,
        "pluginId": 6,
        "pid": 17,
        "order": 1,
        "name": "abcf12312",
    }, {
        "id": 16,
        "pluginId": null,
        "pid": 0,
        "order": 1,
        "name": "sca",
    },
];

//Model替换成表名
var $Model = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Model/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $Model.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($Model.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名
                            $Model.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/Model/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($Model.Arrays.length == 0) {
                            //Model替换成表名
                            $Model.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var loginName = p.model.loginName;
                        var sex = p.model.sex;


                        var offset = p.offset;
                        var limit = p.limit;

                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $Model.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $Model.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (loginName && myentity.loginName.indexOf(loginName) == -1)
                                continue;
                            if (sex && myentity.sex.indexOf(sex) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/Model/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$Model.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/Model/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$Model.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].loginName = thisentity.loginName;
                            thisArrays[i].name = thisentity.id;
                            thisArrays[i].password = thisentity.password;
                            thisArrays[i].sex = thisentity.sex;
                            thisArrays[i].remarks = thisentity.remarks;
                            thisArrays[i].lastUpdate = thisentity.lastUpdate;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$Model.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            loginName: thisentity.loginName,
                            name: thisentity.name,
                            password: thisentity.password,
                            sex: thisentity.sex,
                            remarks: thisentity.remarks,
                            lastUpdate: thisentity.lastUpdate

                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;


        }


    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Model.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                loginName: Mock.Random.cname(),
                password: Mock.Random.cname(),
                name: Mock.mock('@county(true)'),
                lastUpdate: Mock.Random.date(),
                remarks: Mock.mock('@county(true)'),
                sex: randomValue('01'),
                id: Mock.Random.id()
            }));

        }
    }
}


//教育_培训课件houts 2019-5-27 14:27:36
var $PPTAndWord = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/PPTAndWord/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $PPTAndWord.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($PPTAndWord.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $PPTAndWord.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/PPTAndWord/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($PPTAndWord.Arrays.length == 0) {
                            //Model替换成表名
                            $PPTAndWord.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var Name = p.model.Name
                        var Category = getDicValue("83", p.model.Category)
                        var Teacher = p.model.Teacher
                        var LlearningTime = p.model.LlearningTime
                        var Courseware = p.model.Courseware
                        var IsEncrypted = p.model.IsEncrypted
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $PPTAndWord.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $PPTAndWord.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (Name && myentity.Name.indexOf(Name) == -1)
                                continue;
                            if (Category && myentity.Category.indexOf(Category) == -1)
                                continue;
                            if (Teacher && myentity.Teacher.indexOf(Teacher) == -1)
                                continue;
                            if (LlearningTime && myentity.LlearningTime.indexOf(LlearningTime) == -1)
                                continue;
                            if (Courseware && myentity.Courseware.indexOf(Courseware) == -1)
                                continue;
                            if (IsEncrypted && myentity.IsEncrypted.indexOf(IsEncrypted) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/PPTAndWord/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$PPTAndWord.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/PPTAndWord/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$PPTAndWord.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Name = thisentity.Name;
                            thisArrays[i].Category = thisentity.Category;
                            thisArrays[i].Teacher = thisentity.Teacher;
                            thisArrays[i].LlearningTime = thisentity.LlearningTime;
                            thisArrays[i].Courseware = thisentity.Courseware;
                            thisArrays[i].IsEncrypted = thisentity.IsEncrypted;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$PPTAndWord.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            Name: thisentity.Name,
                            Category: thisentity.Category,
                            Teacher: thisentity.Teacher,
                            LlearningTime: thisentity.LlearningTime,
                            Courseware: thisentity.Courseware,
                            IsEncrypted: thisentity.IsEncrypted,
                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $PPTAndWord.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                Name: Mock.Random.cname(),
                Category: randomValue('83'),
                Teacher: Mock.Random.cname(),
                LlearningTime: Mock.Random.cname(),
                Courseware: Mock.Random.cname(),
                IsEncrypted: Mock.Random.cname(),
                id: Mock.Random.id()
            }));
        }
    }
}



//学时信息统计 
var $HoursInformationStatistics = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/HoursInformationStatistics/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $HoursInformationStatistics.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($HoursInformationStatistics.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $HoursInformationStatistics.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/HoursInformationStatistics/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($HoursInformationStatistics.Arrays.length == 0) {
                            //Model替换成表名
                            $HoursInformationStatistics.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var Nameoftrainee = p.model.Nameoftrainee
                        var TimeslotStar = p.model.TimeslotStar
                        var TimeslotEnd = p.model.TimeslotEnd
                        var SchoolhoursStar = p.model.SchoolhoursStar
                        var SchoolhoursEnd = p.model.SchoolhoursEnd


                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $HoursInformationStatistics.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $HoursInformationStatistics.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (Nameoftrainee && myentity.Nameoftrainee.indexOf(Nameoftrainee) == -1)
                                continue;
                            if (SchoolhoursStar && SchoolhoursStar >= myentity.Schoolhours)
                                continue;
                            if (SchoolhoursEnd && SchoolhoursEnd <= myentity.Schoolhours)
                                continue;
                            if (TimeslotStar && TimeslotStar >= myentity.Timeslot)
                                continue;
                            if (TimeslotEnd && TimeslotEnd <= myentity.Timeslot)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/HoursInformationStatistics/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$HoursInformationStatistics.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/HoursInformationStatistics/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$HoursInformationStatistics.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].Nameoftrainee == thisentity.Nameoftrainee) {
                            thisArrays[i].Learningtime = thisentity.Learningtime;
                            thisArrays[i].Timeslot = thisentity.Timeslot;
                            thisArrays[i].Schoolhours = thisentity.Schoolhours;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$HoursInformationStatistics.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.Nameoftrainee,
                            Learningtime: thisentity.Learningtime,
                            Timeslot: thisentity.Timeslot,
                            Schoolhours: thisentity.Schoolhours,

                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $HoursInformationStatistics.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                Nameoftrainee: Mock.Random.cname(),
                Timeslot: randomValue('83'),
                Learningtime: Mock.Random.string('number', 2),
                Timeslot: Mock.Random.date(),
                Schoolhours: Mock.Random.date(),

            }));
        }
    }
}


var treeErrorRateStatisticsofExaminationQuestionsCategoryData = [{
        "id": 1,
        "code": 10000,
        "pid": 0,
        "name": "全部分类",

    },
    {
        "id": 6,
        "code": 10001,
        "pid": 1,
        "name": "2017年第二季度第一次培训",
    },
    {
        "id": 7,
        "code": 10002,
        "pid": 1,
        "name": "2017年第二季度第二次培训",
    },
];

//考题错误率统计
var $ErrorRateStatisticsofExaminationQuestions = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/ErrorRateStatisticsofExaminationQuestions/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $ErrorRateStatisticsofExaminationQuestions.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($ErrorRateStatisticsofExaminationQuestions.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $ErrorRateStatisticsofExaminationQuestions.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/ErrorRateStatisticsofExaminationQuestions/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($ErrorRateStatisticsofExaminationQuestions.Arrays.length == 0) {
                            //Model替换成表名
                            $ErrorRateStatisticsofExaminationQuestions.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var ExaminationName = p.model.ExaminationName

                        var TreeNode = p.model.TreeNode;
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $ErrorRateStatisticsofExaminationQuestions.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $ErrorRateStatisticsofExaminationQuestions.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (ExaminationName && myentity.ExaminationName.indexOf(ExaminationName) == -1)
                                continue;
                            if (TreeNode && myentity.TreeNode.indexOf(TreeNode) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/ErrorRateStatisticsofExaminationQuestions/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$ErrorRateStatisticsofExaminationQuestions.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/ErrorRateStatisticsofExaminationQuestions/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$ErrorRateStatisticsofExaminationQuestions.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].ExaminationName == thisentity.ExaminationName) {
                            thisArrays[i].Numberofanswers = thisentity.Numberofanswers;
                            thisArrays[i].Numberoferrors = thisentity.Numberoferrors;
                            thisArrays[i].errorrate = thisentity.errorrate;

                            // thisUsers[i].TreeNode = thisuser.TreeNode;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$ErrorRateStatisticsofExaminationQuestions.Arrays.push({
                            //遍历所有字段 赋值
                            ExaminationName: thisentity.ExaminationName,
                            Numberofanswers: thisentity.Numberofanswers,
                            Numberoferrors: thisentity.Numberoferrors,
                            errorrate: thisentity.errorrate,

                            TreeNode: thisuser.TreeNode,
                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $ErrorRateStatisticsofExaminationQuestions.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                ExaminationName: randomValue('HSEExam'),
                Numberofanswers: Mock.Random.string('number', 2),
                Numberoferrors: Mock.Random.string('number', 1),
                errorrate: Mock.Random.string('number', 2) + "%",

                TreeNode: randomTreeNode(treeErrorRateStatisticsofExaminationQuestionsCategoryData)
            }));
        }
    }
}

//人员培训参与率
var $Participationrateinpersonneltraining = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Participationrateinpersonneltraining/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $Participationrateinpersonneltraining.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($Participationrateinpersonneltraining.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $Participationrateinpersonneltraining.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/Participationrateinpersonneltraining/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($Participationrateinpersonneltraining.Arrays.length == 0) {
                            //Model替换成表名
                            $Participationrateinpersonneltraining.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var Nameoftrainingplan = p.model.Nameoftrainingplan

                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $Participationrateinpersonneltraining.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $Participationrateinpersonneltraining.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (Nameoftrainingplan && myentity.Nameoftrainingplan.indexOf(Nameoftrainingplan) == -1)
                                continue;

                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/Participationrateinpersonneltraining/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$Participationrateinpersonneltraining.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/Participationrateinpersonneltraining/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$Participationrateinpersonneltraining.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].Nameoftrainingplan == thisentity.Nameoftrainingplan) {
                            thisArrays[i].Numberofparticipantsintraining = thisentity.Numberofparticipantsintraining;
                            thisArrays[i].Numberofcheckins = thisentity.Numberofcheckins;
                            thisArrays[i].Absencerate = thisentity.Absencerate;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$Participationrateinpersonneltraining.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.Nameoftrainingplan,
                            Numberofparticipantsintraining: thisentity.Numberofparticipantsintraining,
                            Numberofcheckins: thisentity.Numberofcheckins,
                            Absencerate: thisentity.Absencerate,

                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Participationrateinpersonneltraining.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                Nameoftrainingplan: randomValue('PXPlanName'),
                Numberofparticipantsintraining: Mock.Random.string('number', 2),
                Numberofcheckins: Mock.Random.string('number', 2),
                Absencerate: Mock.Random.string('number', 1) + "%",

            }));
        }
    }
}

// 培训档案
var $TrainingAchievements = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/TrainingAchievements/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $TrainingAchievements.Arrays.length; i++) {
                        temp.push($TrainingAchievements.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $TrainingAchievements.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/TrainingAchievements/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($TrainingAchievements.Arrays.length == 0) {
                            $TrainingAchievements.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var EmployeeName = p.model.EmployeeName;
                        var Department = p.model.Department;


                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $TrainingAchievements.Arrays.length; i++) {
                            var TrainingAchievements = $TrainingAchievements.Arrays[i];
                            if (EmployeeName && TrainingAchievements.EmployeeName.indexOf(EmployeeName) == -1)
                                continue;
                            if (Department && TrainingAchievements.Department.indexOf(Department) == -1)
                                continue;



                            limitArrays2.push(TrainingAchievements);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/TrainingAchievements/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$TrainingAchievements.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/TrainingAchievements/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$TrainingAchievements.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].EmployeeName = thisentity.EmployeeName;
                            thisArrays[i].StartingDate = thisentity.StartingDate;
                            thisArrays[i].Department = thisentity.Department;
                            thisArrays[i].Position = thisentity.Position;
                            thisArrays[i].Numberoftrainingsessionsduringthistimeperiod = thisentity.Numberoftrainingsessionsduringthistimeperiod;
                            thisArrays[i].name = thisentity.name;
                            thisArrays[i].Gender = thisentity.Gender;
                            thisArrays[i].BirthDate = thisentity.BirthDate;
                            thisArrays[i].Education = thisentity.Education;
                            thisArrays[i].Workinghours = thisentity.Workinghours;
                            thisArrays[i].jobtime = thisentity.jobtime;
                            thisArrays[i].GraduateTime = thisentity.GraduateTime;
                            thisArrays[i].GraduateSchool2 = thisentity.GraduateSchool2;
                            thisArrays[i].WorkingDepartment = thisentity.WorkingDepartment;
                            thisArrays[i].Jobs = thisentity.Jobs;
                            thisArrays[i].Whatyearandmonthvalueandannualcontract = thisentity.Whatyearandmonthvalueandannualcontract;
                            thisArrays[i].Whichdepartmentisinwhichposition = thisentity.Whichdepartmentisinwhichposition;
                            thisArrays[i].Anyposition = thisentity.Anyposition;
                            thisArrays[i].Remarks = thisentity.Remarks;
                            thisArrays[i].Trainingtime = thisentity.Trainingtime;
                            thisArrays[i].TrainingCourseware = thisentity.TrainingCourseware;
                            thisArrays[i].TouristLocation = thisentity.TouristLocation;
                            thisArrays[i].TrainingObjectives2 = thisentity.TrainingObjectives2;
                            thisArrays[i].TrainingType = thisentity.TrainingType;
                            thisArrays[i].TrainingContent = thisentity.TrainingContent;
                            thisArrays[i].PlannedUnplanned = thisentity.PlannedUnplanned;
                            thisArrays[i].Score = thisentity.Score;
                            thisArrays[i].EmployeeSignature = thisentity.EmployeeSignature;




                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$TrainingAchievements.Arrays.push({
                            id: thisentity.id,
                            EmployeeName: thisentity.EmployeeName,
                            StartingDate: thisentity.StartingDate,
                            Department: thisentity.Department,
                            Position: thisentity.Position,
                            Numberoftrainingsessionsduringthistimeperiod: thisentity.Numberoftrainingsessionsduringthistimeperiod,
                            name: thisentity.name,
                            Gender: thisentity.Gender,
                            BirthDate: thisentity.BirthDate,
                            Education: thisentity.Education,
                            Workinghours: thisentity.Workinghours,
                            jobtime: thisentity.jobtime,
                            GraduateTime: thisentity.GraduateTime,
                            GraduateSchool2: thisentity.GraduateSchool2,
                            WorkingDepartment: thisentity.WorkingDepartment,
                            Jobs: thisentity.Jobs,
                            Whatyearandmonthvalueandannualcontract: thisentity.Whatyearandmonthvalueandannualcontract,
                            Whichdepartmentisinwhichposition: thisentity.Whichdepartmentisinwhichposition,
                            Anyposition: thisentity.Anyposition,
                            Remarks: thisentity.Remarks,
                            Trainingtime: thisentity.Trainingtime,
                            TrainingCourseware: thisentity.TrainingCourseware,
                            TouristLocation: thisentity.TouristLocation,
                            TrainingObjectives2: thisentity.TrainingObjectives2,
                            TrainingType: thisentity.TrainingType,
                            TrainingContent: thisentity.TrainingContent,
                            PlannedUnplanned: thisentity.PlannedUnplanned,
                            Score: thisentity.Score,
                            EmployeeSignature: thisentity.EmployeeSignature,


                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $TrainingAchievements.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                EmployeeName: Mock.Random.cname(), //员工名称
                StartingDate: Mock.Random.date(), //入职日期
                Department: randomValue('14'), //部门
                Position: randomValue('n84'), //职位
                Numberoftrainingsessionsduringthistimeperiod: Mock.Random.string('number', 2), //此时间段培训次数
                name: randomValue('02'), //姓名
                Gender: randomValue('01'), //性别
                BirthDate: Mock.Random.date(), //出生日期
                Education: randomValue('w716'), //学历
                Workinghours: Mock.Random.date(), //参加工作时间
                jobtime: Mock.Random.date(), //入职时间
                GraduateTime: Mock.Random.date(), //毕业院校
                GraduateSchool2: randomValue('w716-1'), //毕业院校
                WorkingDepartment: randomValue('14'), //工作部门
                Jobs: randomValue('60'), //工作岗位
                Whatyearandmonthvalueandannualcontract: Mock.Random.date(), //何年何月值和年合约
                Whichdepartmentisinwhichposition: randomValue('14'), //在何部门何岗位
                Anyposition: randomValue('n84'), //任何职务
                Remarks: randomValue('54'), //备注
                Trainingtime: Mock.Random.date(), //培训时间
                TrainingCourseware: randomValue('54'), //培训目标
                TouristLocation: randomValue('11'), //培训地点
                TrainingObjectives2: Mock.Random.string('number', 2), //培训目标
                TrainingType: randomValue('56'), //培训类型
                TrainingContent: randomValue('136'), //培训内容
                PlannedUnplanned: randomValue('w716-2'), //计划内/计划外
                Score: Mock.Random.string('number', 2), //得分
                EmployeeSignature: randomValue('02'), //员工签字




            }));

        }
    }
}

//培训计划完成情况
var $Completionoftrainingplan = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Completionoftrainingplan/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $Completionoftrainingplan.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($Completionoftrainingplan.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $Completionoftrainingplan.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/Completionoftrainingplan/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($Completionoftrainingplan.Arrays.length == 0) {
                            //Model替换成表名
                            $Completionoftrainingplan.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var curriculum = p.model.curriculum
                        var Examinationmethods = p.model.Examinationmethods
                        var TrainingtimeStar = p.model.TrainingtimeStar
                        var TrainingtimeEnd = p.model.TrainingtimeEnd

                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $Completionoftrainingplan.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $Completionoftrainingplan.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (curriculum && myentity.curriculum.indexOf(curriculum) == -1)
                                continue;
                            if (Examinationmethods && myentity.Examinationmethods.indexOf(Examinationmethods) == -1)
                                continue;
                            if (TrainingtimeStar && TrainingtimeStar >= myentity.Trainingtime)
                                continue;
                            if (TrainingtimeEnd && TrainingtimeEnd <= myentity.Trainingtime)
                                continue;

                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/Completionoftrainingplan/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$Completionoftrainingplan.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/Completionoftrainingplan/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$Completionoftrainingplan.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].Trainingtime == thisentity.Trainingtime) {
                            thisArrays[i].curriculum = thisentity.curriculum;
                            thisArrays[i].Trainingtarget = thisentity.Trainingtarget;
                            thisArrays[i].Numberofplannedtrainees = thisentity.Numberofplannedtrainees;
                            thisArrays[i].Numberofactualtrainees = thisentity.Numberofactualtrainees;
                            thisArrays[i].Coursehours = thisentity.Coursehours;
                            thisArrays[i].budget = thisentity.budget;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$Completionoftrainingplan.Arrays.push({
                            //遍历所有字段 赋值
                            Trainingtime: thisentity.Trainingtime,
                            curriculum: thisentity.curriculum,
                            Trainingtarget: thisentity.Trainingtarget,
                            Numberofplannedtrainees: thisentity.Numberofplannedtrainees,
                            Numberofactualtrainees: thisentity.Numberofactualtrainees,
                            Coursehours: thisentity.Coursehours,
                            budget: thisentity.budget,
                            Examinationmethods: thisentity.Examinationmethods,

                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Completionoftrainingplan.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                Trainingtime: Mock.Random.date(),
                curriculum: randomValue('90'),
                Trainingtarget: Mock.Random.cname(),
                Numberofplannedtrainees: Mock.Random.string('number', 2),
                Numberofactualtrainees: Mock.Random.string('number', 2),
                Coursehours: Mock.Random.string('number', 1),
                budget: Mock.Random.string('number', 4),
                Examinationmethods: randomValue('w64'),

            }));
        }
    }
}

var treePersonnelCertificateQualificationManagementCategoryData = [{
        "id": 1,
        "pid": 0,
        "name": "根节点",
    },
    {
        "id": 2,
        "pid": 1,
        "name": "生产指挥中心",
    },
    {
        "id": 3,
        "pid": 2,
        "name": "市场开发部",
    },
    {
        "id": 4,
        "pid": 1,
        "name": "生产技术部",
    },
    {
        "id": 5,
        "pid": 1,
        "name": "财务部",
    },
];
//人员证书资质管理
var $PersonnelCertificateQualificationManagement = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/PersonnelCertificateQualificationManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $PersonnelCertificateQualificationManagement.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($PersonnelCertificateQualificationManagement.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $PersonnelCertificateQualificationManagement.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/PersonnelCertificateQualificationManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($PersonnelCertificateQualificationManagement.Arrays.length == 0) {
                            //Model替换成表名
                            $PersonnelCertificateQualificationManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var PersonnelName = p.model.PersonnelName
                        var Nameofcertificate = p.model.Nameofcertificate
                        var Certificatetype = p.model.Certificatetype
                        var MaturitytimeStar = p.model.MaturitytimeStar
                        var MaturitytimeEnd = p.model.MaturitytimeEnd

                        var TreeNode = p.model.TreeNode;
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $PersonnelCertificateQualificationManagement.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $PersonnelCertificateQualificationManagement.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (PersonnelName && myentity.PersonnelName.indexOf(PersonnelName) == -1)
                                continue;
                            if (Nameofcertificate && myentity.Nameofcertificate.indexOf(Nameofcertificate) == -1)
                                continue;
                            if (Certificatetype && myentity.Certificatetype.indexOf(Certificatetype) == -1)
                                continue;

                            if (MaturitytimeStar && MaturitytimeStar >= myentity.Maturitytime)
                                continue;

                            if (MaturitytimeEnd && MaturitytimeEnd <= myentity.Maturitytime)
                                continue;

                            if (TreeNode && myentity.TreeNode.indexOf(TreeNode) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/PersonnelCertificateQualificationManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$PersonnelCertificateQualificationManagement.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/PersonnelCertificateQualificationManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$PersonnelCertificateQualificationManagement.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Subordinatedepartments = thisentity.Subordinatedepartments;
                            thisArrays[i].Nameofcertificate = thisentity.Nameofcertificate;
                            thisArrays[i].Issuancetime = thisentity.Issuancetime;
                            thisArrays[i].Maturitytime = thisentity.Maturitytime;
                            thisArrays[i].Certificatetype = thisentity.Certificatetype;
                            thisArrays[i].LicenseCoding = thisentity.LicenseCoding;
                            thisArrays[i].Licensingauthority = thisentity.Licensingauthority;
                            thisArrays[i].Termofvalidity = thisentity.Termofvalidity;
                            thisArrays[i].describe = thisentity.describe;
                            thisArrays[i].licence = thisentity.licence;
                            thisArrays[i].sex = thisentity.sex;

                            // thisUsers[i].TreeNode = thisuser.TreeNode;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$PersonnelCertificateQualificationManagement.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            PersonnelName: thisentity.PersonnelName,
                            Subordinatedepartments: thisentity.Subordinatedepartments,
                            Nameofcertificate: thisentity.Nameofcertificate,
                            Issuancetime: thisentity.Issuancetime,
                            Maturitytime: thisentity.Maturitytime,
                            Certificatetype: thisentity.Certificatetype,
                            LicenseCoding: thisentity.LicenseCoding,
                            Licensingauthority: thisentity.Licensingauthority,
                            Termofvalidity: thisentity.Termofvalidity,
                            describe: thisentity.describe,
                            licence: thisentity.licence,
                            sex: thisentity.sex,

                            TreeNode: thisuser.TreeNode,
                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $PersonnelCertificateQualificationManagement.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                id: Mock.Random.id(), //必须有
                PersonnelName: Mock.Random.cname(),
                Subordinatedepartments: randomValue('n69'),
                Nameofcertificate: randomValue('HSEZZMC'),
                Issuancetime: Mock.Random.date(),
                Maturitytime: Mock.Random.date(),
                Certificatetype: randomValue('29'),
                LicenseCoding: randomValue('29'),
                Licensingauthority: randomValue('29'),
                Termofvalidity: Mock.Random.date(),
                describe: randomValue('29'),
                licence: randomValue('29'),
                sex: randomValue('01'),
                birthDate: Mock.Random.date('yyyy-MM-dd'),
                organ: randomValue('14'),

                TreeNode: randomTreeNode(treePersonnelCertificateQualificationManagementCategoryData)
            }));
        }
    }
}

//考试监控
var $Examinationmonitoring = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Examinationmonitoring/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($Examinationmonitoring.Arrays.length == 0) {
                            //Model替换成表名
                            $Examinationmonitoring.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var Nameoftestpaper = p.model.Nameoftestpaper;
                        var CandidateName = p.model.CandidateName;

                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $Examinationmonitoring.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $Examinationmonitoring.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (Nameoftestpaper && myentity.Nameoftestpaper.indexOf(Nameoftestpaper) == -1)
                                continue;
                            if (CandidateName && myentity.CandidateName.indexOf(CandidateName) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Examinationmonitoring.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                id: Mock.Random.id(), //必须有
                Nameoftestpaper: randomValue('HSEExam'), //试卷名称
                starttime: Mock.Random.date(), //开始时间
                state: randomValue('TaskResult'), //状态
                Numberofcandidates: Mock.Random.string('number', 1), //考生人数
                QualifiedNumber: Mock.Random.string('number', 1), //合格人数
                Qualificationscore: Mock.Random.string('number', 2), //合格分数
                CandidateName: Mock.Random.cname(), //考生名称          
                Examinationscore: Mock.Random.string('number', 2), //考试得分
                Examinationstatus: randomValue('w64'), //考试状态
                Numberofexaminations: Mock.Random.string('number', 1), //考试次数
                Whethertoremindleaders: randomValue('50'), //是否提醒领导

            }));
        }
    }
}


// 实际操作考核评分
var $PracticalOperationalAssessmentScore = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/PracticalOperationalAssessmentScore/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $PracticalOperationalAssessmentScore.Arrays.length; i++) {
                        temp.push($PracticalOperationalAssessmentScore.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $PracticalOperationalAssessmentScore.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/PracticalOperationalAssessmentScore/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($PracticalOperationalAssessmentScore.Arrays.length == 0) {
                            $PracticalOperationalAssessmentScore.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Trainingcontent = p.model.Trainingcontent;
                        var Fullname = p.model.Fullname;

                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $PracticalOperationalAssessmentScore.Arrays.length; i++) {
                            var PracticalOperationalAssessmentScore = $PracticalOperationalAssessmentScore.Arrays[i];
                            if (Trainingcontent && PracticalOperationalAssessmentScore.Trainingcontent.indexOf(Trainingcontent) == -1)
                                continue;
                            if (Fullname && PracticalOperationalAssessmentScore.Fullname.indexOf(Fullname) == -1)
                                continue;


                            limitArrays2.push(PracticalOperationalAssessmentScore);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/PracticalOperationalAssessmentScore/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = $PracticalOperationalAssessmentScore.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/PracticalOperationalAssessmentScore/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = $PracticalOperationalAssessmentScore.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Trainingcontent = thisentity.Trainingcontent;
                            thisArrays[i].Fullname = thisentity.Fullname;
                            thisArrays[i].achievement = thisentity.achievement;







                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        $PracticalOperationalAssessmentScore.Arrays.unshift({
                            id: thisentity.id,
                            Trainingcontent: thisentity.Trainingcontent,
                            Fullname: thisentity.Fullname,
                            achievement: thisentity.achievement,







                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $PracticalOperationalAssessmentScore.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Trainingcontent: randomValue('66'), //培训内容
                Fullname: Mock.Random.cname(), //姓名
                achievement: Mock.Random.string('number', 2), //成绩







                // 'score|70-100': 1,
                score: Mock.Random.string('number', 2),
                name: Mock.Random.cname(),
                remarks: Mock.mock('@county(true)'),
            }));

        }
    }
}

// 模拟考试
var $Mockexam = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/Mockexam/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $Mockexam.Arrays.length; i++) {
                        temp.push($Mockexam.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $Mockexam.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/Mockexam/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($Mockexam.Arrays.length == 0) {
                            $Mockexam.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Particularyear = p.model.Particularyear;

                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $Mockexam.Arrays.length; i++) {
                            var Mockexam = $Mockexam.Arrays[i];
                            if (Particularyear && Mockexam.Particularyear.indexOf(Particularyear) == -1)
                                continue;


                            limitArrays2.push(Mockexam);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/Mockexam/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$Mockexam.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/Mockexam/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$Mockexam.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameoftestpaper = thisentity.Nameoftestpaper;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;
                            thisArrays[i].Examinationstarttime = thisentity.Examinationstarttime;
                            thisArrays[i].Endtimeofexamination = thisentity.Endtimeofexamination;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Qualificationscore = thisentity.Qualificationscore;
                            thisArrays[i].Numberofexaminations = thisentity.Numberofexaminations;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$Mockexam.Arrays.push({
                            id: thisentity.id,
                            Nameoftestpaper: thisentity.Nameoftestpaper,
                            Examinationmethods: thisentity.Examinationmethods,
                            Examinationstarttime: thisentity.Examinationstarttime,
                            Endtimeofexamination: thisentity.Endtimeofexamination,
                            state: thisentity.state,
                            Qualificationscore: thisentity.Qualificationscore,
                            Numberofexaminations: thisentity.Numberofexaminations,






                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Mockexam.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Nameoftestpaper: randomValue('HSEExam'), //试卷名称
                Examinationmethods: randomValue('w64'), //考试方式
                Examinationstarttime: Mock.Random.date(), //考试开始时间
                Endtimeofexamination: Mock.Random.date(), //考试结束时间
                state: randomValue('n54'), //状态
                Qualificationscore: Mock.Random.string('number', 2), //合格分数
                Numberofexaminations: Mock.Random.string('number', 1), //考试次数






                // 'score|70-100': 1,
                score: Mock.Random.string('number', 2),
                name: Mock.Random.cname(),
                remarks: Mock.mock('@county(true)'),
            }));

        }
    }
}

// 在线考试
var $EducationExamination = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/EducationExamination/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $EducationExamination.Arrays.length; i++) {
                        temp.push($EducationExamination.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $EducationExamination.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/EducationExamination/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($EducationExamination.Arrays.length == 0) {
                            $EducationExamination.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Particularyear = p.model.Particularyear;

                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $EducationExamination.Arrays.length; i++) {
                            var EducationExamination = $EducationExamination.Arrays[i];
                            if (Particularyear && EducationExamination.Particularyear.indexOf(Particularyear) == -1)
                                continue;


                            limitArrays2.push(EducationExamination);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/EducationExamination/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$EducationExamination.Arrays;
                    myarray = {};
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameoftestpaper = thisentity.Nameoftestpaper;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;
                            thisArrays[i].Examinationstarttime = thisentity.Examinationstarttime;
                            thisArrays[i].Endtimeofexamination = thisentity.Endtimeofexamination;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Qualificationscore = thisentity.Qualificationscore;
                            thisArrays[i].Numberofexaminations = thisentity.Numberofexaminations;
                            thisArrays[i].time = thisentity.time;
                            thisArrays[i].Answerscore = thisentity.Answerscore;
                            thisArrays[i].Correctquantity = thisentity.Correctquantity;
                            thisArrays[i].Wrongnumber = thisentity.Wrongnumber;
                            thisArrays[i].Titleofexamination = thisentity.Titleofexamination;
                            thisArrays[i].rightkey = thisentity.rightkey;
                            thisArrays[i].Mychoice = thisentity.Mychoice;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$EducationExamination.Arrays.push({
                            id: thisentity.id,
                            Nameoftestpaper: thisentity.Nameoftestpaper,
                            Examinationmethods: thisentity.Examinationmethods,
                            Examinationstarttime: thisentity.Examinationstarttime,
                            Endtimeofexamination: thisentity.Endtimeofexamination,
                            state: thisentity.state,
                            Qualificationscore: thisentity.Qualificationscore,
                            Numberofexaminations: thisentity.Numberofexaminations,
                            time: thisentity.time,
                            Answerscore: thisentity.Answerscore,
                            Correctquantity: thisentity.Correctquantity,
                            Wrongnumber: thisentity.Wrongnumber,
                            Titleofexamination: thisentity.Titleofexamination,
                            rightkey: thisentity.rightkey,
                            Mychoice: thisentity.Mychoice,





                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //提交
            case '/api/EducationExamination/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$EducationExamination.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameoftestpaper = thisentity.Nameoftestpaper;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;
                            thisArrays[i].Examinationstarttime = thisentity.Examinationstarttime;
                            thisArrays[i].Endtimeofexamination = thisentity.Endtimeofexamination;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Qualificationscore = thisentity.Qualificationscore;
                            thisArrays[i].Numberofexaminations = thisentity.Numberofexaminations;
                            thisArrays[i].time = thisentity.time;
                            thisArrays[i].Answerscore = thisentity.Answerscore;
                            thisArrays[i].Correctquantity = thisentity.Correctquantity;
                            thisArrays[i].Wrongnumber = thisentity.Wrongnumber;
                            thisArrays[i].Titleofexamination = thisentity.Titleofexamination;
                            thisArrays[i].rightkey = thisentity.rightkey;
                            thisArrays[i].Mychoice = thisentity.Mychoice;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$EducationExamination.Arrays.push({
                            id: thisentity.id,
                            Nameoftestpaper: thisentity.Nameoftestpaper,
                            Examinationmethods: thisentity.Examinationmethods,
                            Examinationstarttime: thisentity.Examinationstarttime,
                            Endtimeofexamination: thisentity.Endtimeofexamination,
                            state: thisentity.state,
                            Qualificationscore: thisentity.Qualificationscore,
                            Numberofexaminations: thisentity.Numberofexaminations,
                            time: thisentity.time,
                            Answerscore: thisentity.Answerscore,
                            Correctquantity: thisentity.Correctquantity,
                            Wrongnumber: thisentity.Wrongnumber,
                            Titleofexamination: thisentity.Titleofexamination,
                            rightkey: thisentity.rightkey,
                            Mychoice: thisentity.Mychoice,

                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $EducationExamination.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Nameoftestpaper: randomValue('HSEExam'), //试卷名称
                Examinationmethods: randomValue('w64'), //考试方式
                Examinationstarttime: Mock.Random.date(), //考试开始时间
                Endtimeofexamination: Mock.Random.date(), //考试结束时间
                state: randomValue('n54'), //状态
                Qualificationscore: Mock.Random.string('number', 2), //合格分数
                Numberofexaminations: Mock.Random.string('number', 1), //考试次数
                time: Mock.Random.date(), //时间
                Answerscore: Mock.Random.string('number', 2), //答题分数
                Correctquantity: Mock.mock({
                    "number|15-20": 20
                }).number, //正确数量
                Wrongnumber: Mock.Random.string('number', 1), //错误数量
                Titleofexamination: randomValue('35'), //考题名称
                rightkey: randomValue('w65'), //正确答案
                Mychoice: randomValue('w65'), //我的选择






                // 'score|70-100': 1,
                score: Mock.Random.string('number', 2),
                name: Mock.Random.cname(),
                remarks: Mock.mock('@county(true)'),
            }));

        }
    }
}




var myTreeLearning = [{
        "id": 1,
        "code": 10000,
        "pid": 0,
        "name": "全部分类",

    },
    {
        "id": 6,
        "code": 10001,
        "pid": 1,
        "name": "2017年第二季度第一次培训",
    },
    {
        "id": 7,
        "code": 10002,
        "pid": 1,
        "name": "2017年第二季度第二次培训",
    },
];
// 学习列表
var $LearningList = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/LearningList/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $LearningList.Arrays.length; i++) {
                        temp.push($LearningList.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $LearningList.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/LearningList/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($LearningList.Arrays.length == 0) {
                            $LearningList.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Nameoftrainee = p.model.Nameoftrainee;

                        //分页条件
                        var TreeNode = p.model.TreeNode;
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $LearningList.Arrays.length; i++) {
                            var LearningList = $LearningList.Arrays[i];
                            if (Nameoftrainee && LearningList.Nameoftrainee.indexOf(Nameoftrainee) == -1)
                                continue;
                            if (TreeNode && LearningList.TreeNode.indexOf(TreeNode) == -1)
                                continue;

                            limitArrays2.push(LearningList);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/LearningList/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$LearningList.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/LearningList/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$LearningList.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameoftrainee = thisentity.Nameoftrainee;
                            thisArrays[i].LearningCourses = thisentity.LearningCourses;
                            thisArrays[i].CourseStatus = thisentity.CourseStatus;
                            thisArrays[i].Lengthofstudy = thisentity.Lengthofstudy;

                            // thisUsers[i].TreeNode = thisuser.TreeNode;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$LearningList.Arrays.push({
                            id: thisentity.id,
                            Nameoftrainee: thisentity.Nameoftrainee,
                            LearningCourses: thisentity.LearningCourses,
                            CourseStatus: thisentity.CourseStatus,
                            Lengthofstudy: thisentity.Lengthofstudy,

                            TreeNode: thisuser.TreeNode,
                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $LearningList.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Nameoftrainee: Mock.Random.cname(), //学员名称
                LearningCourses: randomValue('HSECourse'), //学习课程
                CourseStatus: randomValue('115'), //课程状态
                Lengthofstudy: Mock.Random.string('number', 2), //已学习时长(分钟)


                // 'score|70-100': 1,
                score: Mock.Random.string('number', 2),
                name: Mock.Random.cname(),
                remarks: Mock.mock('@county(true)'),

                TreeNode: randomTreeNode(myTreeLearning)
            }));

        }
    }
}



var myTreeOnlineLearning = [{
        "id": 1,
        "pid": 0,
        "name": "根节点",
    },
    {
        "id": 2,
        "pid": 1,
        "name": "低压站电气安全",
    },
    {
        "id": 3,
        "pid": 1,
        "name": "高压站操作程序",
    },
    {
        "id": 4,
        "pid": 3,
        "name": "高压站作业设备",
    },

];

// 在线学习
var $OnlineLearning = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/OnlineLearning/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $OnlineLearning.Arrays.length; i++) {
                        temp.push($OnlineLearning.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $OnlineLearning.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/OnlineLearning/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($OnlineLearning.Arrays.length == 0) {
                            $OnlineLearning.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Nameofdata = p.model.Nameofdata;

                        var TreeNode = p.model.TreeNode;
                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $OnlineLearning.Arrays.length; i++) {
                            var OnlineLearning = $OnlineLearning.Arrays[i];
                            if (Nameofdata && OnlineLearning.Nameofdata.indexOf(Nameofdata) == -1)
                                continue;

                            if (TreeNode && OnlineLearning.TreeNode.indexOf(TreeNode) == -1)
                                continue;
                            limitArrays2.push(OnlineLearning);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/OnlineLearning/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$OnlineLearning.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/OnlineLearning/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$OnlineLearning.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameofdata = thisentity.Nameofdata;
                            thisArrays[i].Dataclassification = thisentity.Dataclassification;
                            thisArrays[i].Founder = thisentity.Founder;
                            thisArrays[i].Creationtime = thisentity.Creationtime;

                            // thisUsers[i].TreeNode = thisuser.TreeNode;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$OnlineLearning.Arrays.push({
                            id: thisentity.id,
                            Nameofdata: thisentity.Nameofdata,
                            Dataclassification: thisentity.Dataclassification,
                            Founder: thisentity.Founder,
                            Creationtime: thisentity.Creationtime,

                            TreeNode: thisuser.TreeNode,
                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $OnlineLearning.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Nameofdata: randomValue('56'), //资料名称
                Dataclassification: randomValue('29'), //资料分类
                Founder: Mock.Random.cname(), //创建人
                Creationtime: Mock.Random.date(), //创建时间
                // 'score|70-100': 1,
                score: Mock.Random.string('number', 2),
                name: Mock.Random.cname(),
                remarks: Mock.mock('@county(true)'),

                TreeNode: randomTreeNode(myTreeOnlineLearning)
            }));

        }
    }
}


// 培训计划管理
var $TrainingPlanManagement = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/TrainingPlanManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $TrainingPlanManagement.Arrays.length; i++) {
                        temp.push($TrainingPlanManagement.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $TrainingPlanManagement.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/TrainingPlanManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($TrainingPlanManagement.Arrays.length == 0) {
                            $TrainingPlanManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Nameoftrainingplan = p.model.Nameoftrainingplan;
                        var TrainingMatrix = p.model.TrainingMatrix;
                        var Trainer = p.model.Trainer;
                        var Trainers = p.model.Trainers;
                        var TrainingtimeStar = p.model.TrainingtimeStar;
                        var TrainingtimeEnd = p.model.TrainingtimeEnd;

                        var post = p.model.post;

                        //console.log("进来了进来了");
                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $TrainingPlanManagement.Arrays.length; i++) {
                            var TrainingPlanManagement = $TrainingPlanManagement.Arrays[i];
                            if (Nameoftrainingplan && TrainingPlanManagement.Nameoftrainingplan.indexOf(Nameoftrainingplan) == -1)
                                continue;
                            if (TrainingMatrix && TrainingPlanManagement.TrainingMatrix.indexOf(TrainingMatrix) == -1)
                                continue;
                            if (Trainer && TrainingPlanManagement.Trainer.indexOf(Trainer) == -1)
                                continue;
                            if (Trainers && TrainingPlanManagement.Trainers.indexOf(Trainers) == -1)
                                continue;

                            if (TrainingtimeStar && TrainingtimeStar >= TrainingPlanManagement.Trainingtime)
                                continue;
                            if (TrainingtimeEnd && TrainingtimeEnd <= TrainingPlanManagement.Trainingtime)
                                continue;

                            if (post && TrainingPlanManagement.post.indexOf(post) == -1)
                                continue;

                            limitArrays2.push(TrainingPlanManagement);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/TrainingPlanManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$TrainingPlanManagement.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/TrainingPlanManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$TrainingPlanManagement.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Trainingtime = thisentity.Trainingtime;
                            thisArrays[i].trainingcourse = thisentity.trainingcourse;
                            thisArrays[i].Trainingvenues = thisentity.Trainingvenues;
                            thisArrays[i].Typesoftraining = thisentity.Typesoftraining;
                            thisArrays[i].Trainingcontent = thisentity.Trainingcontent;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Trainer = thisentity.Trainer;
                            thisArrays[i].HeadofTraining = thisentity.HeadofTraining;
                            thisArrays[i].Nameoftrainingplan = thisentity.Nameoftrainingplan;
                            thisArrays[i].TrainingMatrix = thisentity.TrainingMatrix;
                            thisArrays[i].Trainingbudget = thisentity.Trainingbudget;
                            thisArrays[i].Trainingmethods = thisentity.Trainingmethods;
                            thisArrays[i].Trainers = thisentity.Trainers;
                            thisArrays[i].facilityvalue = thisentity.facilityvalue;
                            thisArrays[i].Questiontype = thisentity.Questiontype;
                            thisArrays[i].Fullmarks = thisentity.Fullmarks;
                            thisArrays[i].Qualificationscore = thisentity.Qualificationscore;
                            thisArrays[i].JudgmentQuestion = thisentity.JudgmentQuestion;
                            thisArrays[i].Scoresforeachquestion1 = thisentity.Scoresforeachquestion1;
                            thisArrays[i].Singlechoicetopic = thisentity.Singlechoicetopic;
                            thisArrays[i].Scoresforeachquestion2 = thisentity.Scoresforeachquestion2;
                            thisArrays[i].Multipletopics = thisentity.Multipletopics;
                            thisArrays[i].Scoresforeachquestion3 = thisentity.Scoresforeachquestion3;
                            thisArrays[i].Examinationstarttime = thisentity.Examinationstarttime;
                            thisArrays[i].Endtimeofexamination = thisentity.Endtimeofexamination;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;
                            thisArrays[i].Summaryoftraining = thisentity.Summaryoftraining;
                            thisArrays[i].TrainingevaluationmethodsandStrategies = thisentity.TrainingevaluationmethodsandStrategies;
                            thisArrays[i].Trainingcost = thisentity.Trainingcost;
                            thisArrays[i].Overallanalysis = thisentity.Overallanalysis;
                            thisArrays[i].Supportivefactorsandobstacles = thisentity.Supportivefactorsandobstacles;
                            thisArrays[i].Summaryandrecommendations = thisentity.Summaryandrecommendations;


                            thisArrays[i].years = thisentity.years; //年份
                            thisArrays[i].post = thisentity.post; //岗位
                            thisArrays[i].Trainingobjectives = thisentity.Trainingobjectives; //培训目标
                            thisArrays[i].budget = thisentity.budget; //预算
                            thisArrays[i].mastery = thisentity.mastery; //掌握程度 
                            thisArrays[i].peopleNumber = thisentity.peopleNumber; //参加人数


                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$TrainingPlanManagement.Arrays.push({
                            id: thisentity.id,
                            Trainingtime: thisentity.Trainingtime,
                            trainingcourse: thisentity.trainingcourse,
                            Trainingvenues: thisentity.Trainingvenues,
                            Typesoftraining: thisentity.Typesoftraining,
                            Trainingcontent: thisentity.Trainingcontent,
                            state: thisentity.state,
                            Trainer: thisentity.Trainer,
                            HeadofTraining: thisentity.HeadofTraining,
                            Nameoftrainingplan: thisentity.Nameoftrainingplan,
                            TrainingMatrix: thisentity.TrainingMatrix,
                            Trainingbudget: thisentity.Trainingbudget,
                            Trainingmethods: thisentity.Trainingmethods,
                            Trainers: thisentity.Trainers,
                            facilityvalue: thisentity.facilityvalue,
                            Questiontype: thisentity.Questiontype,
                            Fullmarks: thisentity.Fullmarks,
                            Qualificationscore: thisentity.Qualificationscore,
                            JudgmentQuestion: thisentity.JudgmentQuestion,
                            Scoresforeachquestion1: thisentity.Scoresforeachquestion1,
                            Singlechoicetopic: thisentity.Singlechoicetopic,
                            Scoresforeachquestion2: thisentity.Scoresforeachquestion2,
                            Multipletopics: thisentity.Multipletopics,
                            Scoresforeachquestion3: thisentity.Scoresforeachquestion3,
                            Examinationstarttime: thisentity.Examinationstarttime,
                            Endtimeofexamination: thisentity.Endtimeofexamination,
                            Examinationmethods: thisentity.Examinationmethods,
                            Summaryoftraining: thisentity.Summaryoftraining,
                            TrainingevaluationmethodsandStrategies: thisentity.TrainingevaluationmethodsandStrategies,
                            Trainingcost: thisentity.Trainingcost,
                            Overallanalysis: thisentity.Overallanalysis,
                            Supportivefactorsandobstacles: thisentity.Supportivefactorsandobstacles,
                            Summaryandrecommendations: thisentity.Summaryandrecommendations,

                            years: thisentity.years, //年份
                            post: thisentity.post, //岗位
                            Trainingobjectives: thisentity.Trainingobjectives, //培训目标
                            budget: thisentity.budget, //预算
                            mastery: thisentity.mastery, //掌握程度
                            peopleNumber: '5', //参加人数


                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $TrainingPlanManagement.Arrays.push(
                Mock.mock({
                id: Mock.Random.id(), //必须有
                Trainingtime: Mock.Random.date(), //培训时间
                trainingcourse: randomValue('54'), //培训课程
                Trainingvenues: randomValue('10'), //培训地点
                Typesoftraining: randomValue('w64'), //培训类型
                Trainingcontent: randomValue('54'), //培训内容
                state: randomValue('w67'), //状态
                Trainer: Mock.Random.cname(), //培训讲师
                HeadofTraining: Mock.Random.cname(), //培训负责人
                Nameoftrainingplan: randomValue('90'), //培训计划名称
                TrainingMatrix: randomValue('n93'), //培训矩阵
                Trainingbudget: Mock.Random.string('number', 3), //培训预算
                Trainingmethods: randomValue('w64'), //培训方式
                Trainers: Mock.Random.cname(), //培训人员
                facilityvalue: randomValue('55'), //难易度
                Questiontype: randomValue('28'), //题型
                Fullmarks: Mock.Random.string('number', 2), //满分
                Qualificationscore: Mock.Random.string('number', 2), //合格分数
                JudgmentQuestion: Mock.Random.string('number', 1), //判断题
                Scoresforeachquestion1: Mock.Random.string('number', 1), //每题分数
                Singlechoicetopic: Mock.Random.string('number', 1), //单选题
                Scoresforeachquestion2: Mock.Random.string('number', 1), //每题分数
                Multipletopics: Mock.Random.string('number', 1), //多选题
                Scoresforeachquestion3: Mock.Random.string('number', 1), //每题分数
                Examinationstarttime: Mock.Random.date(), //考试开始时间
                Endtimeofexamination: Mock.Random.date(), //考试结束时间
                Examinationmethods: randomValue('w64'), //考试方式
                Summaryoftraining: randomValue('w64'), //培训概要
                TrainingevaluationmethodsandStrategies: randomValue('w64'), //培训评估方法和策略
                Trainingcost: randomValue('w64'), //培训成本
                Overallanalysis: randomValue('w64'), //总体分析
                Supportivefactorsandobstacles: randomValue('w64'), //支持因素和障碍
                Summaryandrecommendations: randomValue('w64'), //总结和建议

                post: randomValue('60'), //岗位
                yOrNTraining: randomValue('50'), //是否培训
                Trainingobjectives: randomValue('04'), //培训目标
                objGroup: Mock.Random.cname(), //目标人群
                peopleNumber: Mock.Random.string('number', 1), //参加人数
                budget: Mock.Random.string('number', 3),   //预算
                mastery: randomValue('Mastery1'),  //掌握程度
                years: Mock.Random.date('yyyy'), //年份

            }));

        }
    }
}

// 签到管理
var $SignInManagement = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/SignInManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $SignInManagement.Arrays.length; i++) {
                        temp.push($SignInManagement.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $SignInManagement.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
            
            //获取List数据
            case '/api/SignInManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($SignInManagement.Arrays.length == 0) {
                            $SignInManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Nameoftrainingplan = p.model.Nameoftrainingplan;
                        var TrainingMatrix = p.model.TrainingMatrix;
                        var Trainer = p.model.Trainer;
                        var Trainers = p.model.Trainers;
                        var TrainingtimeStar = p.model.TrainingtimeStar;
                        var TrainingtimeEnd = p.model.TrainingtimeEnd;

                        var post = p.model.post;
                        var trainingcourse = p.model.trainingcourse;//培训课件名称

                        var partPersonnel = p.model.partPersonnel; //参加人员

                        //console.log("进来了进来了");
                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $SignInManagement.Arrays.length; i++) {
                            var SignInManagement = $SignInManagement.Arrays[i];
                            if (Nameoftrainingplan && SignInManagement.Nameoftrainingplan.indexOf(Nameoftrainingplan) == -1)
                                continue;
                            if (TrainingMatrix && SignInManagement.TrainingMatrix.indexOf(TrainingMatrix) == -1)
                                continue;
                            if (Trainer && SignInManagement.Trainer.indexOf(Trainer) == -1)
                                continue;
                            if (Trainers && SignInManagement.Trainers.indexOf(Trainers) == -1)
                                continue;

                            if (TrainingtimeStar && TrainingtimeStar >= SignInManagement.Trainingtime)
                                continue;
                            if (TrainingtimeEnd && TrainingtimeEnd <= SignInManagement.Trainingtime)
                                continue;

                            if (post && SignInManagement.post.indexOf(post) == -1)
                                continue;

                            if (trainingcourse && SignInManagement.trainingcourse.indexOf(trainingcourse) == -1)
                                continue;

                            if (partPersonnel && SignInManagement.partPersonnel.indexOf(partPersonnel) == -1)
                                continue;

                            limitArrays2.push(SignInManagement);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
            //获取Input数据
            case '/api/SignInManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$SignInManagement.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
            //提交
            case '/api/SignInManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$SignInManagement.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Trainingtime = thisentity.Trainingtime;
                            thisArrays[i].trainingcourse = thisentity.trainingcourse;
                            thisArrays[i].Trainingvenues = thisentity.Trainingvenues;
                            thisArrays[i].Typesoftraining = thisentity.Typesoftraining;
                            thisArrays[i].Trainingcontent = thisentity.Trainingcontent;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Trainer = thisentity.Trainer;
                            thisArrays[i].HeadofTraining = thisentity.HeadofTraining;
                            thisArrays[i].Nameoftrainingplan = thisentity.Nameoftrainingplan;
                            thisArrays[i].TrainingMatrix = thisentity.TrainingMatrix;
                            thisArrays[i].Trainingbudget = thisentity.Trainingbudget;
                            thisArrays[i].Trainingmethods = thisentity.Trainingmethods;
                            thisArrays[i].Trainers = thisentity.Trainers;
                            thisArrays[i].facilityvalue = thisentity.facilityvalue;
                            thisArrays[i].Questiontype = thisentity.Questiontype;
                            thisArrays[i].Fullmarks = thisentity.Fullmarks;
                            thisArrays[i].Qualificationscore = thisentity.Qualificationscore;
                            thisArrays[i].JudgmentQuestion = thisentity.JudgmentQuestion;
                            thisArrays[i].Scoresforeachquestion1 = thisentity.Scoresforeachquestion1;
                            thisArrays[i].Singlechoicetopic = thisentity.Singlechoicetopic;
                            thisArrays[i].Scoresforeachquestion2 = thisentity.Scoresforeachquestion2;
                            thisArrays[i].Multipletopics = thisentity.Multipletopics;
                            thisArrays[i].Scoresforeachquestion3 = thisentity.Scoresforeachquestion3;
                            thisArrays[i].Examinationstarttime = thisentity.Examinationstarttime;
                            thisArrays[i].Endtimeofexamination = thisentity.Endtimeofexamination;
                            thisArrays[i].Examinationmethods = thisentity.Examinationmethods;
                            thisArrays[i].Summaryoftraining = thisentity.Summaryoftraining;
                            thisArrays[i].TrainingevaluationmethodsandStrategies = thisentity.TrainingevaluationmethodsandStrategies;
                            thisArrays[i].Trainingcost = thisentity.Trainingcost;
                            thisArrays[i].Overallanalysis = thisentity.Overallanalysis;
                            thisArrays[i].Supportivefactorsandobstacles = thisentity.Supportivefactorsandobstacles;
                            thisArrays[i].Summaryandrecommendations = thisentity.Summaryandrecommendations;


                            thisArrays[i].years = thisentity.years; //年份
                            thisArrays[i].post = thisentity.post; //岗位
                            thisArrays[i].Trainingobjectives = thisentity.Trainingobjectives; //培训目标
                            thisArrays[i].budget = thisentity.budget; //预算
                            thisArrays[i].mastery = thisentity.mastery; //掌握程度 
                            thisArrays[i].peopleNumber = thisentity.peopleNumber; //参加人数


                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$SignInManagement.Arrays.push({
                            id: thisentity.id,
                            Trainingtime: thisentity.Trainingtime,
                            trainingcourse: thisentity.trainingcourse,
                            Trainingvenues: thisentity.Trainingvenues,
                            Typesoftraining: thisentity.Typesoftraining,
                            Trainingcontent: thisentity.Trainingcontent,
                            state: thisentity.state,
                            Trainer: thisentity.Trainer,
                            HeadofTraining: thisentity.HeadofTraining,
                            Nameoftrainingplan: thisentity.Nameoftrainingplan,
                            TrainingMatrix: thisentity.TrainingMatrix,
                            Trainingbudget: thisentity.Trainingbudget,
                            Trainingmethods: thisentity.Trainingmethods,
                            Trainers: thisentity.Trainers,
                            facilityvalue: thisentity.facilityvalue,
                            Questiontype: thisentity.Questiontype,
                            Fullmarks: thisentity.Fullmarks,
                            Qualificationscore: thisentity.Qualificationscore,
                            JudgmentQuestion: thisentity.JudgmentQuestion,
                            Scoresforeachquestion1: thisentity.Scoresforeachquestion1,
                            Singlechoicetopic: thisentity.Singlechoicetopic,
                            Scoresforeachquestion2: thisentity.Scoresforeachquestion2,
                            Multipletopics: thisentity.Multipletopics,
                            Scoresforeachquestion3: thisentity.Scoresforeachquestion3,
                            Examinationstarttime: thisentity.Examinationstarttime,
                            Endtimeofexamination: thisentity.Endtimeofexamination,
                            Examinationmethods: thisentity.Examinationmethods,
                            Summaryoftraining: thisentity.Summaryoftraining,
                            TrainingevaluationmethodsandStrategies: thisentity.TrainingevaluationmethodsandStrategies,
                            Trainingcost: thisentity.Trainingcost,
                            Overallanalysis: thisentity.Overallanalysis,
                            Supportivefactorsandobstacles: thisentity.Supportivefactorsandobstacles,
                            Summaryandrecommendations: thisentity.Summaryandrecommendations,

                            years: thisentity.years, //年份
                            post: thisentity.post, //岗位
                            Trainingobjectives: thisentity.Trainingobjectives, //培训目标
                            budget: thisentity.budget, //预算
                            mastery: thisentity.mastery, //掌握程度
                            peopleNumber: '5', //参加人数


                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {

            var tableData = [];
            for (var j = 0; j < 18; j++) {
                tableData.push({
                    postSafeProductionContent: Mock.mock('@cparagraph(1, 3)'), //岗位安全生产责任内容
                    assessmentContent: Mock.mock('@cparagraph(1, 3)'), //考核内容
                    weightScore: Mock.Random.string('number', 2), //权重分
                    effectAndDescription: Mock.mock('@cparagraph(1, 3)'), //评估描述
                    score: "",// Mock.Random.string('number', 2), //评分

                    department: randomValue('n52'), //部门
                    name: Mock.Random.cname(),//姓名
                    checkin: Mock.Random.cname(), //签到
                    memo: Mock.mock('@cparagraph(1, 3)'), //备注

                })
            }

            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $SignInManagement.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Trainingtime: Mock.Random.date('yyyy-MM-dd HH:mm:ss'), //培训时间
                trainingcourse: randomValue('54'), //培训课程
                Trainingvenues: randomValue('10'), //培训地点
                Typesoftraining: randomValue('w64'), //培训类型
                Trainingcontent: randomValue('112'), //培训内容
                state: randomValue('w67'), //状态
                Trainer: Mock.Random.cname(), //培训讲师
                HeadofTraining: Mock.Random.cname(), //培训负责人
                Nameoftrainingplan: randomValue('90'), //培训计划名称
                TrainingMatrix: randomValue('n93'), //培训矩阵
                Trainingbudget: Mock.Random.string('number', 3), //培训预算
                Trainingmethods: randomValue('w64'), //培训方式
                Trainers: Mock.Random.cname(), //培训人员
                facilityvalue: randomValue('55'), //难易度
                Questiontype: randomValue('28'), //题型
                Fullmarks: Mock.Random.string('number', 2), //满分
                Qualificationscore: Mock.Random.string('number', 2), //合格分数
                JudgmentQuestion: Mock.Random.string('number', 1), //判断题
                Scoresforeachquestion1: Mock.Random.string('number', 1), //每题分数
                Singlechoicetopic: Mock.Random.string('number', 1), //单选题
                Scoresforeachquestion2: Mock.Random.string('number', 1), //每题分数
                Multipletopics: Mock.Random.string('number', 1), //多选题
                Scoresforeachquestion3: Mock.Random.string('number', 1), //每题分数
                Examinationstarttime: Mock.Random.date(), //考试开始时间
                Endtimeofexamination: Mock.Random.date(), //考试结束时间
                Examinationmethods: randomValue('w64'), //考试方式
                Summaryoftraining: randomValue('w64'), //培训概要
                TrainingevaluationmethodsandStrategies: randomValue('w64'), //培训评估方法和策略
                Trainingcost: randomValue('w64'), //培训成本
                Overallanalysis: randomValue('w64'), //总体分析
                Supportivefactorsandobstacles: randomValue('w64'), //支持因素和障碍
                Summaryandrecommendations: randomValue('w64'), //总结和建议

                post: randomValue('60'), //岗位
                yOrNTraining: randomValue('50'), //是否培训
                Trainingobjectives: randomValue('04'), //培训目标
                objGroup: Mock.Random.cname(), //目标人群
                peopleNumber: Mock.Random.string('number', 1), //参加人数
                budget: Mock.Random.string('number', 3),   //预算
                mastery: randomValue('Mastery1'),  //掌握程度
                years: Mock.Random.date('yyyy'), //年份

                tableData: tableData,//子表_签到表
                corporation: randomValue('139'), //有限公司
                partPersonnel: randomValue('partPersonnel1'), //参加人员

            }));

        }
    }
}



// 我的培训
var $Mytraining = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/Mytraining/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $Mytraining.Arrays.length; i++) {
                        temp.push($Mytraining.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $Mytraining.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/Mytraining/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($Mytraining.Arrays.length == 0) {
                            $Mytraining.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var trainingcourse = p.model.trainingcourse;
                        var TrainingMatrix = p.model.TrainingMatrix;

                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $Mytraining.Arrays.length; i++) {
                            var Mytraining = $Mytraining.Arrays[i];
                            if (trainingcourse && Mytraining.trainingcourse.indexOf(trainingcourse) == -1)
                                continue;
                            if (TrainingMatrix && Mytraining.TrainingMatrix.indexOf(TrainingMatrix) == -1)
                                continue;


                            limitArrays2.push(Mytraining);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/Mytraining/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$Mytraining.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/Mytraining/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$Mytraining.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Trainingtime = thisentity.Trainingtime;
                            thisArrays[i].trainingcourse = thisentity.trainingcourse;
                            thisArrays[i].Trainingvenues = thisentity.Trainingvenues;
                            thisArrays[i].Trainingobjectives = thisentity.Trainingobjectives;
                            thisArrays[i].Typesoftraining = thisentity.Typesoftraining;
                            thisArrays[i].Trainingcontent = thisentity.Trainingcontent;
                            thisArrays[i].state = thisentity.state;
                            thisArrays[i].Score = thisentity.Score;
                            thisArrays[i].name = thisentity.name;
                            thisArrays[i].Trainer = thisentity.Trainer;
                            thisArrays[i].LearningExperience = thisentity.LearningExperience;
                            thisArrays[i].SuggestionsforWork = thisentity.SuggestionsforWork;



                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$Mytraining.Arrays.push({
                            id: thisentity.id,
                            Trainingtime: thisentity.Trainingtime,
                            trainingcourse: thisentity.trainingcourse,
                            Trainingvenues: thisentity.Trainingvenues,
                            Trainingobjectives: thisentity.Trainingobjectives,
                            Typesoftraining: thisentity.Typesoftraining,
                            Trainingcontent: thisentity.Trainingcontent,
                            state: thisentity.state,
                            Score: thisentity.Score,
                            name: thisentity.name,
                            Trainer: thisentity.Trainer,
                            SummaryofContent: thisentity.SummaryofContent,
                            LearningExperience: thisentity.LearningExperience,
                            SuggestionsforWork: thisentity.SuggestionsforWork,



                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Mytraining.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Trainingtime: Mock.Random.date(), //培训时间
                trainingcourse: randomValue('54'), //培训课程
                Trainingvenues: randomValue('10'), //培训地点
                Trainingobjectives: randomValue('04'), //培训目标
                Typesoftraining: randomValue('w64'), //培训类型
                Trainingcontent: randomValue('112'), //培训内容
                state: randomValue('w67'), //状态
                Score: Mock.Random.string('number', 2), //得分
                name: Mock.Random.cname(), //姓名
                Trainer: Mock.Random.cname(), //培训讲师
                SummaryofContent: randomValue('17'), //再要
                LearningExperience: randomValue('19'), //心得
                SuggestionsforWork: randomValue('20'), //建议



            }));

        }
    }
}

//试题管理
var myTree = [{
        "id": 1,
        "code": 10000,
        "pid": 0,
        "name": "全部分类",

    },
    {
        "id": 6,
        "code": 10001,
        "pid": 1,
        "name": "2017年第二季度第一次培训",
    },
    {
        "id": 7,
        "code": 10002,
        "pid": 1,
        "name": "2017年第二季度第二次培训",
    },
];



var $ContractorDirectoryManagement = {
    DealUrl: function (vueApp, url, type, param) {
        var my = vueApp;
        switch (url) {
            //获取List数据
            case '/api/ContractorDirectoryManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($ContractorDirectoryManagement.EquipmenFacilities.length == 0) {
                            $ContractorDirectoryManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //条件

                        var ContractorName = p.model.ContractorName;
                        var ConstructionCategory = getDicValue("25", p.model.ConstructionCategory);
                        //分页
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitUsers2 = [];
                        for (var i = 0; i < $ContractorDirectoryManagement.EquipmenFacilities.length; i++) {
                            var user = $ContractorDirectoryManagement.EquipmenFacilities[i];
                            if (ContractorName && user.ContractorName.indexOf(ContractorName) == -1)
                                continue;
                            if (ConstructionCategory && user.ConstructionCategory.indexOf(ConstructionCategory) == -1)
                                continue;
                            user.ConstructionCategory = getDicValue("25", user.ConstructionCategory) == '' ? user.ConstructionCategory : getDicValue("25", user.ConstructionCategory);
                            limitUsers2.push(user);
                        }
                        var limitUsers = [];
                        for (var i = 0; i < limitUsers2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitUsers.push(limitUsers2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitUsers,
                                rowCount: limitUsers2.length
                            }
                        };
                    });
                break;
            case '/api/ContractorDirectoryManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {

                    var myUsers = parent.$ContractorDirectoryManagement.EquipmenFacilities;
                    myuser = {};
                    for (var i = 0; i < myUsers.length; i++) {
                        if (myUsers[i].id == vueApp.id) {
                            myuser = myUsers[i];
                            break;
                        }
                    }
                    myuser.ConstructionCategory = getDicKey("25", myuser.ConstructionCategory);
                    return {
                        result: "Success",
                        message: null,
                        data: myuser
                    };
                });
                break;
        }
    },
    EquipmenFacilities: [],
    InitArray: function () {
        for (var i = 0; i < 80; i++) {
            $ContractorDirectoryManagement.EquipmenFacilities.push(Mock.mock({
                id: Mock.Random.id(),
                ContractorName: randomValue("139"), //承包商名称
                PrincipalName: Mock.Random.cname(), //负责人姓名
                Age: Mock.mock('@integer(25, 50)'),
                Qualification: Mock.mock('@cparagraph(1, 1)'),
                IDNumber: Mock.mock('@float(0)'),
                ConstructionCategory: randomValue("25"),
                SupervisorManufacturer: Mock.mock('@cparagraph(1, 1)'),
                Administration: randomValue("08"),
                QualificationLevel: Mock.mock('@integer(1, 5)'),
                TechnicalStaffSituation: Mock.mock('@cparagraph(1, 1)'),
                MainaAchievement: Mock.mock('@cparagraph(1, 1)')
            }));

        }
    }
}

//试题管理
var $QuestionManagement = {
    DealUrl: function (vueApp, url, type, param) {
        var my = vueApp;

        switch (url) {
            ////删除
            case '/api/QuestionManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $QuestionManagement.EquipmenFacilities.length; i++) {
                        temp.push($QuestionManagement.EquipmenFacilities[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $QuestionManagement.EquipmenFacilities.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/QuestionManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($QuestionManagement.EquipmenFacilities.length == 0) {
                            $QuestionManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        var TreeNode = p.model.TreeNode;
                        var QuestionManagementContent = p.model.QuestionManagementContent;
                        //条件
                        //  var TrainingCoursewareName = getDicValue("54", p.model.TrainingCoursewareName);
                        //分页
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitUsers2 = [];
                        for (var i = 0; i < $QuestionManagement.EquipmenFacilities.length; i++) {
                            var user = $QuestionManagement.EquipmenFacilities[i];
                            if (TreeNode && user.TreeNode.indexOf(TreeNode) == -1)
                                continue;
                            if (QuestionManagementContent && user.QuestionManagementContent.indexOf(QuestionManagementContent) == -1)
                                continue;
                            user.QuestionManagementType = getDicValue("28", user.QuestionManagementType) == '' ? user.QuestionManagementType : getDicValue("28", user.QuestionManagementType);
                            user.DegreeOfDifficulty = getDicValue("55", user.DegreeOfDifficulty) == '' ? user.DegreeOfDifficulty : getDicValue("55", user.DegreeOfDifficulty);
                            limitUsers2.push(user);
                        }
                        var limitUsers = [];
                        for (var i = 0; i < limitUsers2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitUsers.push(limitUsers2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitUsers,
                                rowCount: limitUsers2.length
                            }
                        };
                    });
                break;
                ////获取Input数据
            case '/api/QuestionManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myUsers = parent.$QuestionManagement.EquipmenFacilities;
                    myuser = {};
                    for (var i = 0; i < myUsers.length; i++) {
                        if (myUsers[i].id == vueApp.id) {
                            myuser = myUsers[i];
                            break;
                        }
                    }
                    myuser.QuestionManagementType = getDicKey("28", myuser.QuestionManagementType);
                    myuser.DegreeOfDifficulty = getDicKey("55", myuser.DegreeOfDifficulty);
                    return {
                        result: "Success",
                        message: null,
                        data: myuser
                    };
                });
                break;
                ////提交
            case '/api/QuestionManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisuser = JSON.parse(options.body);
                    var thisUsers = parent.$QuestionManagement.EquipmenFacilities;
                    var cz = true;
                    for (var i = 0; i < thisUsers.length; i++) {
                        if (thisUsers[i].id == thisuser.id) {
                            thisUsers[i].QuestionManagementContent = thisuser.QuestionManagementContent;
                            thisUsers[i].CoursewareID = thisuser.CoursewareID;
                            thisUsers[i].QuestionManagementType = thisuser.QuestionManagementType;
                            thisUsers[i].DegreeOfDifficulty = thisuser.DegreeOfDifficulty;
                            thisUsers[i].Answer = thisuser.Answer;
                            thisUsers[i].OptionsList = thisuser.OptionsList;
                            thisUsers[i].Courseware = Mock.Random.cname();
                            thisUsers[i].editorTime = Mock.Random.datetime(); //编辑时间
                            // thisUsers[i].TreeNode = thisuser.TreeNode(); //编辑时间       
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        parent.$QuestionManagement.EquipmenFacilities.push({
                            id: thisuser.id,
                            QuestionManagementContent: thisuser.QuestionManagementContent,
                            CoursewareID: thisuser.CoursewareID,
                            QuestionManagementType: thisuser.QuestionManagementType,
                            DegreeOfDifficulty: thisuser.DegreeOfDifficulty,
                            Answer: thisuser.Answer,
                            Courseware: Mock.Random.cname(),
                            // editorTime: Mock.Random.datetime(), //编辑时间
                            OptionsList: thisuser.OptionsList,
                            TreeNode: thisuser.TreeNode,
                        });

                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    EquipmenFacilities: [],
    InitArray: function () {

        for (var i = 0; i < 15; i++) {
            var codeS = random(8, 15);
            var Number = random(2, 4);
            var answer = Mock.mock('@cword("ABCD", 1)');
            $QuestionManagement.EquipmenFacilities.push(Mock.mock({
                id: Mock.Random.id(),
                Courseware: randomValue("n91"), //编辑人
                editorTime: Mock.Random.datetime(), //编辑时间
                QuestionManagementContent: randomValue("n85"), // ,//试题内容
                CoursewareID: codeS, //课件类型ID
                QuestionManagementType: randomValue("28"), //试题类型
                DegreeOfDifficulty: randomValue("55"), //难易程度
                Answer: answer, //答案
                OptionsList: OptionsList(), //试题选项
                TreeNode: randomTreeNode(myTree)
            }));
        }
    }
}

function OptionsList() {
    var QuestionManagementOptionsList = [];
    for (var i = 0; i < 4; i++) {
        var OptionsList = {};
        OptionsList.OptionName = getDicValue("80", i);
        OptionsList.OptionComment = Mock.mock('@ctitle');
        OptionsList.IsAnswer = randomValue("50");
        QuestionManagementOptionsList.push(OptionsList);
    }
    return QuestionManagementOptionsList;
}

//培训课程管理
var $TrainingCourseManagement = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/TrainingCourseManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $TrainingCourseManagement.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($TrainingCourseManagement.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $TrainingCourseManagement.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/TrainingCourseManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($TrainingCourseManagement.Arrays.length == 0) {
                            //Model替换成表名
                            $TrainingCourseManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var CoursewareName = p.model.CoursewareName
                        var ClassificationofCourseware = p.model.ClassificationofCourseware
                        var Trainer = p.model.Trainer
                        var Encryptionornot = p.model.Encryptionornot


                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $TrainingCourseManagement.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $TrainingCourseManagement.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (CoursewareName && myentity.CoursewareName.indexOf(CoursewareName) == -1)
                                continue;
                            if (ClassificationofCourseware && myentity.ClassificationofCourseware.indexOf(ClassificationofCourseware) == -1)
                                continue;
                            if (Trainer && myentity.Trainer.indexOf(Trainer) == -1)
                                continue;
                            if (Encryptionornot && myentity.Encryptionornot.indexOf(Encryptionornot) == -1)
                                continue;


                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/TrainingCourseManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$TrainingCourseManagement.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/TrainingCourseManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$TrainingCourseManagement.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].CoursewareName = thisentity.CoursewareName;
                            thisArrays[i].ClassificationofCourseware = thisentity.ClassificationofCourseware;
                            thisArrays[i].Learningtime = thisentity.Learningtime;
                            thisArrays[i].Encryptionornot = thisentity.Encryptionornot;
                            thisArrays[i].Trainer = thisentity.Trainer;
                            thisArrays[i].Courseware = thisentity.Courseware;

                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$TrainingCourseManagement.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            CoursewareName: thisentity.CoursewareName,
                            ClassificationofCourseware: thisentity.ClassificationofCourseware,
                            Learningtime: thisentity.Learningtime,
                            Encryptionornot: thisentity.Encryptionornot,
                            Trainer: thisentity.Trainer,
                            Courseware: thisentity.Courseware,


                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $TrainingCourseManagement.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                id: Mock.Random.id(), //必须有
                CoursewareName: randomValue('54'), //课件名称
                ClassificationofCourseware: randomValue('PPTAndWordCategoryTrue'), //课件分类
                Learningtime: Mock.Random.string('number', 2), //学习时长
                Encryptionornot: randomValue('n94'), //是否加密
                Trainer: Mock.Random.cname(), //培训讲师
                Courseware: randomValue('54'), //课件


            }));
        }
    }
}







var myTreeTraining = [{
        "id": 1,
        "pid": 0,
        "name": "根节点",
    },
    {
        "id": 2,
        "pid": 1,
        "name": "门机驾驶员",
    },
    {
        "id": 3,
        "pid": 1,
        "name": "司机",
    }
];

//培训需求矩阵管理
var $TrainingDemandMatrixManagement = {
    DealUrl: function (vueApp, url, type, param) {
        var my = vueApp;
        switch (url) {
            //Model替换成表名
            case '/api/TrainingDemandMatrixManagement/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $TrainingDemandMatrixManagement.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($TrainingDemandMatrixManagement.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $TrainingDemandMatrixManagement.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/TrainingDemandMatrixManagement/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($TrainingDemandMatrixManagement.Arrays.length == 0) {
                            //Model替换成表名
                            $TrainingDemandMatrixManagement.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var NameofTrainingNeeds = p.model.NameofTrainingNeeds
                        var post = p.model.post

                        var trainingcourse = p.model.trainingcourse  //培训课程

                        var SkillsRequirements = p.model.SkillsRequirements

                        var TreeNode = p.model.TreeNode;
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $TrainingDemandMatrixManagement.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $TrainingDemandMatrixManagement.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (NameofTrainingNeeds && myentity.NameofTrainingNeeds.indexOf(NameofTrainingNeeds) == -1)
                                continue;
                            if (post && myentity.post.indexOf(post) == -1)
                                continue;
                            if (SkillsRequirements && myentity.SkillsRequirements.indexOf(SkillsRequirements) == -1)
                                continue;
                            if (trainingcourse && myentity.trainingcourse.indexOf(trainingcourse) == -1)
                                continue;

                            if (TreeNode && myentity.TreeNode.indexOf(TreeNode) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/TrainingDemandMatrixManagement/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$TrainingDemandMatrixManagement.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/TrainingDemandMatrixManagement/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$TrainingDemandMatrixManagement.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].NameofTrainingNeeds = thisentity.NameofTrainingNeeds;
                            thisArrays[i].MatrixDescription = thisentity.MatrixDescription;
                            thisArrays[i].trainingcourse = thisentity.trainingcourse;
                            thisArrays[i].post = thisentity.post;
                            thisArrays[i].SkillsRequirements = thisentity.SkillsRequirements;

                            thisArrays[i].CourseList = thisentity.CourseList;

                            thisArrays[i].TreeNode = thisentity.TreeNode;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$TrainingDemandMatrixManagement.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            NameofTrainingNeeds: thisentity.NameofTrainingNeeds,
                            MatrixDescription: thisentity.MatrixDescription,
                            trainingcourse: thisentity.trainingcourse,
                            post: thisentity.post,
                            SkillsRequirements: thisentity.SkillsRequirements,

                            CourseList : thisentity.CourseList,//20191009子表数据

                            TreeNode: thisentity.TreeNode,
                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $TrainingDemandMatrixManagement.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                id: Mock.Random.id(), //必须有
                NameofTrainingNeeds: randomValue('54'), //培训需求名称
                MatrixDescription: randomValue('83'), //矩阵描述
                trainingcourse: randomValue('83'), //培训课程
                post: randomValue('60'), //岗位
                SkillsRequirements: randomValue('w66'), //技能要求
                CourseList: CourseList(), //试题选项

                TreeNode: randomTreeNode(myTreeTraining),

                TrainingFrequencyYear: Mock.Random.string('number', 2),//培训频次(年/次)

            }));
        }
    }
}
function CourseList() {
    var QuestionManagementCourseList = [];
    for (var i = 0; i < 4; i++) {
        var CourseList = {};
        CourseList.course = randomValue('83');
        CourseList.SkillsRequirements= randomValue('w66'), //技能要求
        CourseList.LastTrainingTime = Mock.Random.date();
        CourseList.TrainingFrequency = Mock.mock({
            "number|1-3": 3
        }).number+' 年/次';
        QuestionManagementCourseList.push(CourseList);
    }
    return QuestionManagementCourseList;
}

var myTreeTrainingscore = [{
        "id": 1,
        "code": 10000,
        "pid": 0,
        "name": "全部分类",

    },
    {
        "id": 6,
        "code": 10001,
        "pid": 1,
        "name": "2017年第二季度第一次培训",
    },
    {
        "id": 7,
        "code": 10002,
        "pid": 1,
        "name": "2017年第二季度第二次培训",
    },
];
// 培训成绩
var $Trainingscore = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////删除
            case '/api/Trainingscore/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    for (var i = 0; i < $Trainingscore.Arrays.length; i++) {
                        temp.push($Trainingscore.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            $Trainingscore.Arrays.splice(temp[i], 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //获取List数据
            case '/api/Trainingscore/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        if ($Trainingscore.Arrays.length == 0) {
                            $Trainingscore.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //查询条件 写自己的查询条件 
                        var Nameofexaminee = p.model.Nameofexaminee;
                        var TreeNode = p.model.TreeNode;
                        //分页条件
                        var offset = p.offset;
                        var limit = p.limit;
                        //查询条件 按自己实际的去过滤
                        var limitArrays2 = [];
                        for (var i = 0; i < $Trainingscore.Arrays.length; i++) {
                            var Trainingscore = $Trainingscore.Arrays[i];
                            if (Nameofexaminee && Trainingscore.Nameofexaminee.indexOf(Nameofexaminee) == -1)
                                continue;
                            if (TreeNode && Trainingscore.TreeNode.indexOf(TreeNode) == -1)
                                continue;

                            limitArrays2.push(Trainingscore);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //获取Input数据
            case '/api/Trainingscore/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    var myArrays = parent.$Trainingscore.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //提交
            case '/api/Trainingscore/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    var thisArrays = parent.$Trainingscore.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //按自己实际的去修改内容
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Nameofexaminee = thisentity.Nameofexaminee;
                            thisArrays[i].Fraction = thisentity.Fraction;
                            thisUsers[i].TreeNode = thisentity.TreeNode;



                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Input 页面需要 去操作List页面的数组 parent
                        //按自己实际的去添加内容
                        parent.$Trainingscore.Arrays.push({
                            id: thisentity.id,
                            Nameofexaminee: thisentity.Nameofexaminee,
                            Fraction: thisentity.Fraction,


                            TreeNode: thisentity.TreeNode,

                        });
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Trainingscore.Arrays.push(Mock.mock({
                id: Mock.Random.id(), //必须有
                Nameofexaminee: Mock.Random.cname(),
                Fraction: Mock.mock({
                    "number|55-100": 100
                }),
                TreeNode: randomTreeNode(myTreeTrainingscore)


            }));

        }
    }
}


//教育_试题管理wangjy 2019-6-11 19:19:36
var $Questions = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Questions/DeleteMuti':
                Mock.mock(host + url, type, function (options) {
                    var delIDs = options.body;
                    var temp = [];
                    //Model替换成表名
                    for (var i = 0; i < $Questions.Arrays.length; i++) {
                        //Model替换成表名
                        temp.push($Questions.Arrays[i]);
                    }
                    for (var i = 0; i < temp.length; i++) {
                        if (delIDs.includes(temp[i].id)) {
                            //Model替换成表名

                            $Questions.Arrays.splice(i, 1);
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
                //Model替换成表名
            case '/api/Questions/GetList':
                Mock.mock(host + url, type,
                    function (options) {
                        //Model替换成表名
                        if ($Questions.Arrays.length == 0) {
                            //Model替换成表名
                            $Questions.InitArray();
                        }
                        var p = JSON.parse(options.body);
                        //遍历字段
                        var Name = p.model.Name
                        var Type = getDicValue("132", p.model.Type)
                        var Level = p.model.Level
                        var CreatTime = p.model.CreatTime
                        var Answer = p.model.Answer
                        var offset = p.offset;
                        var limit = p.limit;
                        var limitArrays2 = [];
                        //Model替换成表名
                        for (var i = 0; i < $Questions.Arrays.length; i++) {
                            //Model替换成表名
                            var myentity = $Questions.Arrays[i];
                            //遍历所有字段 过滤数据
                            if (Name && myentity.Name.indexOf(Name) == -1)
                                continue;
                            if (Type && myentity.Type.indexOf(Type) == -1)
                                continue;
                            if (Level && myentity.Level.indexOf(Level) == -1)
                                continue;
                            if (CreatTime && myentity.CreatTime.indexOf(CreatTime) == -1)
                                continue;
                            if (Answer && myentity.Answer.indexOf(Answer) == -1)
                                continue;
                            limitArrays2.push(myentity);
                        }
                        var limitArrays = [];
                        for (var i = 0; i < limitArrays2.length; i++) {
                            if (i < offset + limit && i >= offset) {
                                limitArrays.push(limitArrays2[i]);
                            }
                        }
                        return {
                            result: "Success",
                            message: null,
                            data: {
                                pageData: limitArrays,
                                rowCount: limitArrays2.length
                            }
                        };
                    });
                break;
                //Model替换成表名
            case '/api/Questions/get':
                Mock.mock(host + url + '?' + param, type, function (options) {
                    //Model替换成表名
                    var myArrays = parent.$Questions.Arrays;
                    myarray = {};
                    for (var i = 0; i < myArrays.length; i++) {
                        if (myArrays[i].id == vueApp.id) {
                            myarray = myArrays[i];
                            break;
                        }
                    }
                    return {
                        result: "Success",
                        message: null,
                        data: myarray
                    };
                });
                break;
                //Model替换成表名
            case '/api/Questions/Save':
                Mock.mock(host + url, type, function (options) {
                    var thisentity = JSON.parse(options.body);
                    //Model替换成表名
                    var thisArrays = parent.$Questions.Arrays;
                    var cz = true;
                    for (var i = 0; i < thisArrays.length; i++) {
                        //遍历所有字段 赋值
                        if (thisArrays[i].id == thisentity.id) {
                            thisArrays[i].Name = thisentity.Name;
                            thisArrays[i].Type = thisentity.Type;
                            thisArrays[i].Level = thisentity.Level;
                            thisArrays[i].CreatTime = thisentity.CreatTime;
                            thisArrays[i].Answer = thisentity.Answer;
                            cz = false;
                            break;
                        }
                    }
                    if (cz) {
                        //Model替换成表名
                        parent.$Questions.Arrays.push({
                            //遍历所有字段 赋值
                            id: thisentity.id,
                            Name: thisentity.Name,
                            Type: thisentity.Type,
                            Level: thisentity.Level,
                            CreatTime: thisentity.CreatTime,
                            Answer: thisentity.Answer,
                        });
                    }

                    return {
                        result: "Success",
                        message: null,
                        data: null
                    };
                });
                break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Questions.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                Name: randomValue('j14'),
                Type: randomValue('j12'),
                Level: randomValue('j13'),
                CreatTime: Mock.Random.date('yyyy-MM-dd'),
                Answer: randomValue('j15'),
                id: Mock.Random.id()
            }));
        }
    }
}
//--http://mockjs.com/examples.html mock规则